Setting body of v3 Webhook for MS Teams integration

Hello

I’d like PagerDuty to send notifications to a Microsoft Teams channel. I’d need to be able to configure that using Terraform. As I didn’t find any way to configure the bot using Terraform, I’m looking into using Webhooks to make the connection between PagerDuty and Teams.

(If there’d be a way to configure the Microsoft Teams Integration in PagerDuty using Terraform, I’d be all ears!)

On the Integrations ⇒ Generic Webhooks (V3) page, I added a New Webhook and pasted the URL to the Incoming Webhook Connector setup in Teams (URL: https://company.webhook.office.com/webhookb2/…@…/IncomingWebhook/…/…).

But when an incident gets created, nothing shows up in the Teams channel.

Could it be, that it’s not using a correct body?

When curl'ing, at least this has to be used:

$ curl -v -X POST -d '{"text":"Hello World!"}' https://company.webhook.office.com/webhookb2/…@…/IncomingWebhook/…/…

When I don’t use {"text":"Hello World!"} as body, the message doesn’t show up; ie. curl … -d "Hello World!" … does not work.

So…

How do I configure the body of a V3 Webhook?

Thanks.

It is not possible to customize any of our webhooks. You’ll need to send the webhook to something that can receive them, extract the needed data, then reformat it into a new webhook (HTTP POST/PUT/GET, etc) to be relayed to your destination (MS Teams message in a certain channel, etc).

You could use our Runbook/Process Automation solution, an Azure Function/Logic App or AWS Lambda as an example.

Uhm :frowning_face:

That’s really unfortunate to hear. Neither is it possible to configure MS Teams Integration with Terraform, nor is it (easily) possible to make use of webhooks to send notifications to MS Teams or other systems :confused:

(Other systems: we’d also need to be able to send notifications to eg. Freshdesk. There’s an incoming webhook, which would receive notifications, but the body needs to be formatted in the right way.)

Would you happen to have a link to documentation or examples showing how to get this to work with your Runbook/Process Automation solution or with Azure Function/Logic App?

Hi Alexander,

You can read more/contact us regarding more information for Process Automation: https://www.pagerduty.com/platform/automation/.

We have a link to our integration guide for the Microsoft Azure Logic Apps available here: https://www.pagerduty.com/docs/guides/microsoft-azure-logic-apps-integration-guide/

Thanks,
Abbott
Support Team Lead - East